# -*- coding: UTF-8 -*-
# __author__ = 'Sengo'

from OpenGL.GL import *
from OpenGL.GLU import *
from OpenGL.GLUT import *

from scanline import do_z_buffer
from settings import SCREEN_SIZE


def init():
    glClearColor(0.0, 0.0, 0.0, 1.0)
    gluOrtho2D(0, SCREEN_SIZE, 0, SCREEN_SIZE)


def draw():
    # scan_line(vertexes, lines)
    glutInit()
    glutInitDisplayMode(GLUT_RGBA | GLUT_SINGLE)
    glutInitWindowSize(SCREEN_SIZE, SCREEN_SIZE)
    glutCreateWindow("lab2")
    # glutDisplayFunc(draw_func)
    glutDisplayFunc(do_z_buffer)
    glutIdleFunc(do_z_buffer)
    init()
    glutMainLoop()





